package com.xiaoxiao.spring.starter;

import com.xiaoxiao.spring.bean.DefaultBeanFactory;
import com.xiaoxiao.spring.bean.BeanFactory;
import com.xiaoxiao.spring.web.TomcatServer;

import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;

public class SpringRunner {
	private static Set<Object> container = new CopyOnWriteArraySet<>();

	public static void run(Class<?> clazz, String[] args) {
		BeanFactory beanFactory = new DefaultBeanFactory();
		//初始化容器
		beanFactory.initContainer(clazz);
		new TomcatServer(args).startServer();
	}


}
